﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace EntityFrameworks.Entity.Core.CommonEnums
{
    /// <summary>
    /// 支付类型
    /// Flags特性的枚举类型支持并运算
    /// 赋值方式：2^n，避免进行并运算后的值与已有的值重复
    /// 用户余额:1 ,在线支付:2
    /// </summary>
    [Flags]
    public enum PayType : byte
    {
        /// <summary>
        /// 用户余额
        /// </summary>
        [Description("用户余额")]
        UserBalance = 1,
        /// <summary>
        /// 学习卡
        /// </summary>
        [Description("学习卡")]
        StudyCard = 2,
        /// <summary>
        /// 支付宝支付
        /// </summary>
        [Description("支付宝支付")]
        Alipay = 4,
        /// <summary>
        /// 银联支付
        /// </summary>
        [Description("银联支付")]
        ChinaPay = 8,
        /// <summary>
        /// 在线支持
        /// </summary>
        [Description("在线支持")]
        Online = PayType.Alipay | PayType.ChinaPay,

    }

}
